/**
 * 判断参数是否为空
 * 
 * @param {Object}
 *            str
 */
function isEmpty(str) {
	if (str == null || str == '' || str == 'undefined') {
		return true;
	} else {
		return false;
	}
}
/**
 * 获取浏览器名字+版本字符串以JSON串的格式输出
 */
function getBrowserInfo() {
	var u = window.navigator.userAgent.toLocaleLowerCase();
	var msie = /(msie) ([\d.]+)/;
	var chrome = /(chrome)\/([\d.]+)/;
	var firefox = /(firefox)\/([\d.]+)/;
	var safari = /(safari)\/([\d.]+)/;
	var opera = /(opera)\/([\d.]+)/;

	var ie11 = /(trident)\/([\d.]+)/;
	b = u.match(msie) || u.match(chrome) || u.match(firefox) || u.match(safari)
			|| u.match(opera) || u.match(ie11);
	return {
		NAME : b[1],
		VERSION : parseInt(b[2])
	};
}
$.extend({
	getUrlVars : function() {
		var vars = [], hash;
		var hashes = window.location.href.slice(
				window.location.href.indexOf('?') + 1).split('&');
		for (var i = 0; i < hashes.length; i++) {
			hash = hashes[i].split('=');
			vars.push(hash[0]);
			vars[hash[0]] = hash[1];
		}
		return vars;
	},
	getUrlVar : function(name) {
		return $.getUrlVars()[name];
	}
});